package com.smfx.yxt.common.enums;

public enum ExchangeCourseType {
	
	CHANGE(1, "调课"),
	REPLACE(2, "代课"),
	LOOK(3, "代自习");

	private final Integer code;
	
	private final String desc;
	
	private ExchangeCourseType(Integer code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDesc(Integer code) {
		for(ExchangeCourseType status : ExchangeCourseType.values()) {
			if(status.getCode() == code) {
				return status.getDesc();
			}
		}
		return null;
	}

	public Integer getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
}
